#ifndef SDRAGON_ANIMATION_H_INCLUDED
#define SDRAGON_ANIMATION_H_INCLUDED

#include <math.h>

#include "SDragon_GeneralIncludes.h"
#include "SDR_Animation.h"
#include "SDragon_Tools.h"
#include "SDR_Window.h"

#include "SDragon_Surface.h"
#include "SDragon_Button.h"

typedef uint8_t (*SDR_AnimationFunction)(SDR_Window*, SDR_Animation*);

SDR_Animation * DLL_EXPORT SDR_Animation_new(SDR_SurfaceType surfaceType, void * element, SDR_AnimationFunction animationFunction);
SDR_Animation * DLL_EXPORT SDR_Animation_newFromSurface(SDR_Surface * surface, SDR_AnimationFunction animationFunction);
SDR_Animation * DLL_EXPORT SDR_Animation_newFromButton(SDR_Button * button, SDR_AnimationFunction animationFunction);

void DLL_EXPORT SDR_Animation_setParameter(SDR_Animation * animation, int16_t begin, int end, uint16_t time, uint16_t resolution);
void DLL_EXPORT SDR_Animation_setNext(SDR_Animation * animation, SDR_Animation * nextAnimation);
void DLL_EXPORT SDR_Animation_setOtherParameter(SDR_Animation * animation, void * otherParameter);

void DLL_EXPORT SDR_Animation_setStatus(SDR_Animation * animation, SDR_AnimationStatus status);
SDR_AnimationStatus DLL_EXPORT SDR_Animation_getStatus(SDR_Animation * animation);
void DLL_EXPORT SDR_Animation_start(SDR_Animation * animation);
void DLL_EXPORT SDR_Animation_stop(SDR_Animation * animation);
void DLL_EXPORT SDR_Animation_reset(SDR_Animation * animation);



// Liste of animation

uint8_t DLL_EXPORT SDR_Animation_blur(SDR_Window * window, SDR_Animation * animation);

uint8_t DLL_EXPORT SDR_Animation_moveX(SDR_Window * window, SDR_Animation * animation);
uint8_t DLL_EXPORT SDR_Animation_moveY(SDR_Window * window, SDR_Animation * animation);

uint8_t DLL_EXPORT SDR_Animation_delay(SDR_Window * window, SDR_Animation * animation);

#endif // SDRAGON_ANIMATION_H_INCLUDED
